package cn.com.lutao.singleton.best;

/**
 * Created by LT on 2017-09-21.
 */
public class SingletonTest {
    private static  SingletonTest singleton = null;
    private SingletonTest(){}
    private static synchronized void syncInit(){
        if(singleton == null){
            singleton = new SingletonTest();
        }
    }
    public static SingletonTest getSingleton(){
        if(singleton == null){
            syncInit();
        }
        return singleton;
    }
}
